# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=cloc
pkgver=1.86
pkgrel=0
pkgdesc="Count lines of code"
url="https://github.com/AlDanial/cloc"
arch="noarch"
license="GPL-2.0-or-later Artistic-2.0"
depends="perl perl-algorithm-diff perl-regexp-common
	perl-parallel-forkmanager"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/AlDanial/cloc/archive/$pkgver.tar.gz
	disable-git-tests.patch"

build() {
	make -C "$builddir"/Unix
}

check() {
	make -C "$builddir"/Unix test
}

package() {
	cd "$builddir"/Unix
	make DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -Dm644 NEWS README AUTHORS \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="fe6101404f5884d11bf73de43bd25e533b04a70707b95e4e9482b51413aed46ddb55beaa27e3d25cd7604394a739f7cac6c1f8695cd9cab3f23adf6e27171719  cloc-1.86.tar.gz
57c645db88bd83a06c32a38311b5f5a8cb0b86af454f20c7f4ce4311cc87932f8a61de381d5ca9f7189271034b487f2cb35f1d8568674f772d2969fb2e4e9cac  disable-git-tests.patch"
